﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace PRE.Register
{
    public partial class FrmDSDangky : DevExpress.XtraEditors.XtraForm
    {
        DAL.EntitesDAL.LophocDAL _dal = new DAL.EntitesDAL.LophocDAL();
        DAL.EntitesDAL.KhoahocDAL _dal1 = new DAL.EntitesDAL.KhoahocDAL();
        public static string _malop;

        public FrmDSDangky()
        {
            InitializeComponent();
        }

        private void FrmDSDangkyc_Load(object sender, EventArgs e)
        {
           DataTable tmp = _dal1.Select_Current(DateTime.Now);
           DataTable dtb = _dal.Select_Tongso(tmp.Rows[0]["Makhoa"] + "");
           if (dtb != null)
               grcMain.DataSource = dtb;
        }

        private void btnRefesh_Click(object sender, EventArgs e)
        {
            FrmDSDangkyc_Load(sender, e);
        }

        private void btnXemDS_Click(object sender, EventArgs e)
        {
            _malop = grvMain.GetFocusedRowCellValue("Malop") + "";
            Register.FrmDSHocvienDK frm = new FrmDSHocvienDK();
            frm._malop = _malop;
            frm.ShowDialog();
        }
    }
}